//
//  ComplaintListCell.m
//  YueYueSpecailCarDriver
//
//  Created by 李亚军 on 17/3/1.
//  Copyright © 2017年 黄旺鑫. All rights reserved.
//

#import "ComplaintListCell.h"
#import "HeaderMacro.h"
#import "ComplaintModel.h"
#import <QXDriverConfiguration/QXDriverConfiguration.h>

@implementation ComplaintListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    [self configureAttributes];
}


/**
 配置默认属性
 */
- (void)configureAttributes {
    
    self.backView.layer.cornerRadius = 3.0;
    self.backView.layer.masksToBounds = YES;
    self.backView.layer.borderWidth = 0.5;
    self.backView.layer.borderColor = Color_dcdfe3.CGColor;
    
    self.isSelectedImageView.hidden = YES;
    self.isSelectedImageView.image = [QXDriverConfiguration imageWithName:@"public_pic_dagou"];
}

/**
 处理 cell UI
 */
- (void)setValueWithComplaintModel:(ComplaintModel *)complaintModel {
    
    if (complaintModel.tagName == nil || complaintModel.tagName.length <= 0) {
        
        self.complaintContent.text = @"";
    }else {
        
        self.complaintContent.text = complaintModel.tagName;
    }
    
    if (complaintModel.isSelected) {
        
        self.backView.layer.borderColor = Color_3e88f5.CGColor;
        self.isSelectedImageView.hidden = NO;
    }else {
        
        self.backView.layer.borderColor = Color_dcdfe3.CGColor;
        self.isSelectedImageView.hidden = YES;
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
